package com.demo0215.feign;

import com.demo0215.entity.Order;
import com.demo0215.entity.OrderVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;

@FeignClient(value = "order")
public interface OrderFeign {
    @PostMapping("/order/save")
    void save(@RequestBody Order order);

    @GetMapping("/order/countByUid/{uid}")
    int countByUid(@PathVariable("uid") long uid);

    @GetMapping("/order/findAllByUid/{index}/{limit}/{uid}")
    OrderVo findAllByUid(@PathVariable int index, @PathVariable int limit, @PathVariable long uid);

}
